package com.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * Created by v_chenqi02 on 2016/11/10.
 */
@RestController
public class ConsumerController {

    @Autowired
    RestTemplate template;

    @Autowired
    ComputerService computerService;

    private static final String url = "http://service-a/";

    @RequestMapping("/add")
    public String getResult(int a, int b){
        return computerService.add(a,b);
    }

    @RequestMapping("/del")
    public String delResult(int a, int b){
        return computerService.del(a,b);
    }

    @RequestMapping("/adddel")
    public String addDelResult(int a, int b){
        return computerService.addNextdel(a,b);
    }

//    @RequestMapping("/add1")
//    public String getFeign(int a, int b){
//        return computerService.add(a,b);
//    }
}
